<!DOCTYPE html >
<html>
<head>
    <link rel="stylesheet" href="demos.css" type="text/css" media="screen" />
    
    <script src="../libraries/RGraph.common.core.js" ></script>
    <script src="../libraries/RGraph.common.dynamic.js" ></script>
    <script src="../libraries/RGraph.common.tooltips.js" ></script>
    <script src="../libraries/RGraph.common.key.js" ></script>
    <script src="../libraries/RGraph.hbar.js" ></script>
    <!--[if lt IE 9]><script src="../excanvas/excanvas.js"></script><![endif]-->
    
    <title>A grouped horizontal bar chart</title>
    
    <meta name="description" content="This is a Horizontal Bar chart that shows grouped data" />
</head>
<body>

    <h1>A grouped horizontal bar chart</h1>
    
    <p>
        This horizontal Bar chart demonstrates the new vmargin and vmargin.grouped settings. The vmargin is either 
        side of the group of bars whilst vmargin.grouped is between the bars in that group.
    </p>

   <canvas id="cvs" width="600" height="600">[No canvas support]</canvas>

   <script>
       window.onload = function ()
       {
           var hbar = new RGraph.HBar('cvs', [[8,6,4,3], [4,8,3,5],[4,9,9,7],[6,5,3,4],[3,7,8,8]])
               .Set('grouping', 'grouped')
               .Set('vmargin', 20)
               .Set('labels', ['Charlie','Jake','Luis','Jack','Bernie'])
               .Set('key', ['Monday','Tuesday','Wednesday','Thursday'])
               .Set('key.position', 'gutter')
               .Set('key.position.gutter.boxed', false)
               .Set('key.colors', ['#3366CC','#DC3912','#FF9900','#109618'])
               .Set('colors', ['Gradient(white:#3366CC:#3366CC)',
                               'Gradient(white:#DC3912:#DC3912)',
                               'Gradient(white:#FF9900:#FF9900)',
                               'Gradient(white:#109618:#109618)'
                               ])
               .Set('tooltips', [
                                 'Monday','Tuesday','Wednesday','Thursday',
                                 'Monday','Tuesday','Wednesday','Thursday',
                                 'Monday','Tuesday','Wednesday','Thursday',
                                 'Monday','Tuesday','Wednesday','Thursday',
                                 'Monday','Tuesday','Wednesday','Thursday'
                                ])
               .Draw();
       }
   </script>

    <p>
        <a href="./">&laquo; Back</a>
    </p>

</body>
</html>